A printing device such as a serial printer conducts printing on sheet (or paper) by providing a print head and causing the print head to move to a width direction orthogonal to a feeding direction of the sheet. The print head forms dots on the sheet to print with a head pin that protrudes toward the sheet. This type of printer detects the right and left edge positions (sheet width direction edge positions) of the sheet when the sheet is loaded to reduce printing actions beyond the range of the sheet so that damage is not caused by the head pin moving beyond the sheet width and hitting a mechanism other than the sheet.
A typical construction and conventional method for detecting the right and left edge positions of sheet (sheet width direction edge position) will be explained with reference to FIGS. 10A, 10B, and 11. FIGS. 10A and 10B illustrate the structure of a typical printer head unit. FIG. 10A is a front view and FIG. 10B is a side view. FIG. 11 schematically illustrates main components of a typical printing device to explain the typical structure and conventional method for detecting the right and left edge positions of sheet (sheet width edge detection).
The printer explained herein is structured to allow the loading of a sheet 2 from the front or back of the printing device, and includes a head unit 10 of the printing device includes a print head 11, a pair of sensors 12a and 12b, a card guide 13, and a carrier 14 as illustrated in FIGS. 10A and 10B. The print head 11, the sensors 12a and 12b, and the card guide 13 are mounted on the carrier 14. The head unit 10 is constructed so as to be able to move in the width direction (horizontal direction in FIG. 11) with respect to the sheet 2 when the carrier 14 is driven by a drive unit (not illustrated).
The sheet 2 which receives the printing is loaded from the front (lower part of FIG. 11) or from the rear in FIG. 11 (upper part of FIG. 11) of the printing device, and is guided between the print head 11 and a platen 20 by the card guide 13. The print head 11 (head unit 10) performs printing on the aforementioned guided sheet 2 while moving in the width direction (left and right directions in FIG. 11) of the sheet 2.
The sensors 12a and 12b are provided as a pair of right and left sensors, and each of the sensors 12a and 12b is a reflective type sensor that detects the presence or absence of the sheet 2. The sensors 12a and 12b are placed on either side of the print head 11 in the width direction (horizontal direction in FIG. 11) with a specific distance provided there-between, and are placed with a specific distance between each other in the feeding direction (vertical direction in FIG. 11) of the sheet 2. The sensor 12a is placed closer to the front (downward direction in FIG. 11) of the printer than the sensor 12b in FIG. 11.
With the above configuration, the positions of the left and right edges 2a and 2b of the sheet 2 are conventionally detected with the procedure described below. The following explanation assumes that the sheet 2 is loaded from the front of the printing device. As illustrated in FIG. 11, the head unit 10 is placed in the center position (refer to the dashed line) when the sheet 2 is loaded, and the left and right edges 2a and 2b of the sheet 2 are detected in a state in which both of the sensors 12a and 12b sense the sheet 2, that is, in a state in which the sheet 2 is loaded as far as the positions of the sensors 12a and 12b. 
First, the head unit 10 is moved from the center position indicated by the dashed line in FIG. 11 to a left home position (chain double-dashed line in FIG. 11) that represents a reference position/point of origin position during front loading. Since the sheet 2 is generally not present at the left home position, the sensor 12a detects a state of absence of the sheet 2 (the color of the platen 20 is black). Next, while the head unit 10 is moved from the left home position to the right (see arrow A1 in FIG. 11), the sensor 12a detects the position of the left edge 2a of the sheet 2 by discriminating between the black color of the platen 20 and the white color of the sheet 2. Specifically, the position in which a change from black to white (change from absence to presence of sheet 2) is detected by the sensor 12a is detected as the position of the left edge 2a of the sheet 2.
When the left edge 2a of the sheet 2 is detected, the head unit 10 is moved from the left home position to the center position indicated by the dashed line in FIG. 11. Since the sheet 2 is generally present at the center position, the sensor 12a detects a present state of the sheet 2 (the color of the sheet 2 is white). Next, while moving the head unit 10 from the center position to the right (see arrow A2 in FIG. 11), the position of the right edge 2b of the sheet 2 is detected by the sensor 12b by discriminating between the black color of the platen 20 and the white color of the sheet 2. Specifically, the position in which a change (change from presence to absence of sheet 2) from white to black is detected by the sensor 12b is detected as the right edge 2b of the sheet 2.
A stepping motor is normally used as the drive unit (not illustrated) that moves the head unit 10. Thus, when positioning the head unit 10 at a specific position such as the center position, the head unit 10 first returns to the left home position that is the point of origin of the stepping motor before being positioned at the specific position.
When the sheet 2 is loaded from the rear of the printer, the right home position is used as the reference/point of origin position, and the positions of the left and right edges 2a and 2b of the sheet 2 are detected in an order in which right and left is reversed in comparison to when front loading occurs.
In the abovementioned conventional procedure, the sensors 12a and 12b are expected to scan the entire region including a range from the left home position up to the position where the left edge 2a is detected, and a range from the center position up to the position where the right edge 2b is detected, when front loading occurs. Similarly, the sensors 12a and 12b are expected to scan the entire region including a range from the right home position up to the position where the right edge 2b is detected, and a range from the center position up to the position where the left edge 2a is detected, when rear loading occurs.
As a result, processing to give an instruction to the stepping motor that drives the head unit 10 to move for each step, and processing to move the head unit 10 only the distance corresponding to one step to detect the presence or absence of the sheet 2, are repeated. In this way, performing the moving and detecting for each step takes the same amount of time as printing letters in the entire region in which the moving and detecting are performed. Thus, in the conventional procedure, a large amount of time is taken to detect the positions of the right and left edges 2a and 2b of the sheet 2 while performing the moving and detecting for each step.
There is a demand for printing devices such as serial printers to perform printing on preprinted sheet. Preprinted sheet is, for example, sheet on which boxes and logos and the like are printed ahead of time.
FIG. 12 illustrates an example of a preprinted sheet 2. As illustrated in the example in FIG. 12, printing with a low reflectance ratio (dark colored preprint) is applied as two preprint portions 2c and 2d at the top of the sheet 2. With this type of sheet 2, the sensor 12b may not be able to discriminate between the black color of the platen 20 and the right side preprint portion 2c when the sensor 12b attempts to detect the position of the right edge 2b of the sheet 2 while the head unit 10 is being moved from the center position to the right as illustrated in FIG. 11.
In this case as illustrated in FIG. 14, the sensor 12b mistakenly senses the left edge of the preprint portion 2c as the position of the right edge 2b of the sheet 2 such that printing data may only be printed to the left edge of the preprint portion 2c even though printing data to be printed as far as the right edge 2b of the sheet 2 is present (see FIG. 13). To avoid this state, the detection of the positions of the left and right edges 2a and 2b of the sheet 2 by the sensors 12a and 12b is cancelled. However, if the position detection is cancelled, there is a possibility that the printed may exceed the sheet area and the head pin may become damaged.
FIG. 13 illustrates an example of a desirable printing result on the sheet 2 illustrated in FIG. 12. FIG. 14 illustrates an example of a printing result when an edge position (right edge position) in the width direction of the sheet is mistakenly sensed due to the preprint on the sheet illustrated in FIG. 12.
As described above, to detect the positions of the left and right edges of the sheet takes a large amount of time in the conventional procedure since movement and detection are conducted for each single step.
Moreover, when detecting the positions of the left and right edges on preprinted sheet, the preprint portion is mistakenly sensed as the edge position of the sheet in the conventional procedure so that the printing of data is not able to be carried out in the desired range.
Japanese Laid-open Patent Publication No. 2007-145540 and Japanese Laid-open Patent Publication No. 62-70075 are examples of the related art.